package com.project.service;

import java.util.List;

import com.project.dao.MessageDao;
import com.project.entity.Message;
import com.project.util.DateUtil;
import com.project.util.PKUtil;

public class MessageService {
	MessageDao md=new MessageDao();
	public void save(String userid, String projectid, String cont) {
		Message ms=new Message();
		ms.setCont(cont);
		ms.setCreatetime(DateUtil.getNow());
		ms.setId(PKUtil.getId());
		ms.setProjectid(projectid);
		ms.setUserid(userid);
		md.save(ms);
		
		
	}
	public List<Message> findAllMessageByProjectid(String pid) {
		
		
		return md.findAllMessageByProjectid(pid);
	}

	
	
		
}
